<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script>
            var d = new Date();
            // alert(d);
           /*  alert(d.toDateString());
            alert(d.toTimeString()); */

            /* alert(d.toLocaleDateString());
            alert(d.toLocaleTimeString()); */

            alert(d.toLocaleDateString() + " " + d.toLocaleTimeString());

            /* 
                系统给我们的不一定是最好的，最好是自定义。
             */
        </script>
    </head>
    <body>
        
    </body>
</html>